<template>
  <div class="capture">
    <div class="left">
      <Input type="text" v-model="captcha"></Input>
    </div>
    <div class="right">
      <PicCode @click.native="refresh" ref="pic"></PicCode>
    </div>
  </div>
</template>
<script>
import capturemixins from "@libs/mixins/login/capturemixins";
import PicCode from "./PicCode";
export default {
  components: {
    PicCode
  },
  mixins: [capturemixins],
  name: "Capture",
  props: {
    value: {
      type: [String, Number],
      default: ""
    }
  },
  computed: {
    captcha: {
      get() {
        return this.value;
      },
      set(val) {
        this.$emit("input", val);
      }
    }
  },
  methods: {},
  mounted() {}
};
</script>
<style lang="stylus" scoped>
.capture {
  height: 44px
  position: relative
  margin: 10px 0
  .left {
    position: absolute
    left: 0
    bottom: 0
    width: 220px
  }
  .right {
    position: absolute
    bottom: 0
    right: 0
    width: 90px
  }
}
</style>